<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	<p:messages autoUpdate="true" />
	<h:form>
		<h:panelGrid columns="3" style="margin-bottom:10px" cellpadding="5">
			<!-- 			<p:selectOneMenu id="gender" value="#{customerMaintBean.loanApplication.loanType}"> -->
			<!-- 				use property name not method name -->
			<!-- 				<f:selectItems itemValue="#{customerMaintBean.getLoanTypeValues()}" /> -->
			<!-- 			</p:selectOneMenu> -->
			<p:outputLabel for="loanApplicationStatus" value="Igénylés fázisa" />
			<h:outputText id="loanApplicationStatus" styleClass="outputLabel" value="#{customerMaintBean.loanApplication.status}" />
			<p:message for="loanApplicationStatus" />

			<p:outputLabel for="loanType" value="Termék típusok" />
			<p:selectOneRadio id="loanType" required="true" value="#{customerMaintBean.loanApplication.loanType}">
				<f:selectItem itemLabel="Termék 1." itemValue="1" />
				<f:selectItem itemLabel="Termék 2." itemValue="2" />
				<!-- 				<f:selectItem itemLabel="Product 3." itemValue="3" /> -->
			</p:selectOneRadio>
			<p:message for="loanType" />

			<p:outputLabel for="loanAmountByCustomer" value="Kölcsön összege (ügyfél)" />
			<p:inputText readonly="#{customerMaintBean.loanApplication.status gt 0}" id="loanAmountByCustomer" required="true" value="#{customerMaintBean.loanApplication.loanAmountByCustomer}" />
			<p:message for="loanAmountByCustomer" />

			<p:outputLabel for="loanAmountByBank" value="Kölcsön összege (bank)" />

			<h:outputText id="loanAmountByBank" styleClass="outputLabel" value="#{customerMaintBean.loanApplication.loanAmountByBank}" />
			<p:message for="loanAmountByBank" />

			<p:outputLabel for="durationByCustomer" value="Kölcsön futamideje (ügyfél)" />
			<p:inputText id="durationByCustomer" required="true" value="#{customerMaintBean.loanApplication.durationByCustomer}" />
			<p:message for="durationByCustomer" />

			<p:outputLabel for="durationByBank" value="Kölcsön futamideje (bank)" />
			<h:outputText id="durationByBank" value="#{customerMaintBean.loanApplication.durationByBank}" />
			<p:message for="durationByBank" />

			<p:outputLabel for="loanCoverInsurrance" value="Hitelfedezeti biztosítás" rendered="#{customerMaintBean.loanApplication.status > 0}"/>
			<p:selectOneMenu id="loanCoverInsurrance" required="true" value="#{customerMaintBean.loanApplication.loanCoverInsurrance}" rendered="#{customerMaintBean.loanApplication.status > 0}">
				<f:selectItem itemLabel="Kérem válasszon!" itemValue="" />
				<f:selectItems value="#{mainData.loanCoverInsurrance}" />
			</p:selectOneMenu>
			<p:message for="loanCoverInsurrance" rendered="#{customerMaintBean.loanApplication.status > 0}"/>

			<p:outputLabel for="bankAccountNumber" value="Bankszámlaszám" />
			<p:selectOneMenu id="bankAccountNumber" required="true" value="#{customerMaintBean.loanApplication.bankAccountNumber}" >
				<f:selectItem itemLabel="Kérem válasszon!" itemValue="" />
				<f:selectItems value="#{customerMaintBean.customer.checkingAccounts}" var="account" itemValue="#{account.bankAccountNumber}" itemLabel="#{account.bankAccountNumber}" />
			</p:selectOneMenu>
			<p:message for="bankAccountNumber" />

			<h:panelGroup id="teszt">
				<h:outputLabel value="csak kettes állapotban" rendered="#{customerMaintBean.loanApplication.status == 2}" />
			</h:panelGroup>
		</h:panelGrid>
		<p:commandButton process="@form" update="@form" value="Mentés" action="#{customerMaintBean.setLoanTypeName()}" disabled="#{customerMaintBean.loanApplication.status gt 2}"/>
	</h:form>
</ui:composition>